package com.finalproject.ui;
/**
 * ExpenseProfileTab Panel for UI
 */
import java.awt.BorderLayout;

import javax.swing.BorderFactory;
import javax.swing.JPanel;

import com.finalproject.entity.CardHolder;
import com.finalproject.entity.CardHolderDatabase;

public class UIExpenseProfileTabPanel extends JPanel{

	private UIExpenseProfile uiExpenseProfile;
	
	
	private UICardHolder uiCardHolder;
	
	private JPanel leftPanel;
	
	private JPanel rightPanel;
	
	private CardHolderDatabase cardHolderDatabase = CardHolderDatabase.getInstance();
	
	public UIExpenseProfileTabPanel() {
		super(new BorderLayout(5,5));
		leftPanel = new JPanel();
		leftPanel.setLayout(new BorderLayout());
		rightPanel = new JPanel();
		rightPanel.setLayout(new BorderLayout());
		
		
		add(leftPanel,BorderLayout.CENTER);
		add(rightPanel,BorderLayout.EAST);
		
		UIExpenseSummary uiExpenseSummary = new UIExpenseSummary();
		leftPanel.add(uiExpenseSummary,BorderLayout.NORTH);
	//	leftPanel.add(, BorderLayout.NORTH);
		CardHolder cardHolder = cardHolderDatabase.getCardHolders().get(0);
		uiExpenseProfile = new UIExpenseProfile(cardHolder);
		
		UICardHolder uiCardHolder = new UICardHolder();
		rightPanel.add(uiCardHolder,BorderLayout.NORTH);
		rightPanel.add(uiExpenseProfile,BorderLayout.CENTER);
		
		
		rightPanel.setPreferredSize(UIConstants.RIGHT_PANEL_PREFERRED);
	}
}
